/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Car_bookings;
import Entity.Etbl_Car_types;
import Model.DALtbl_Car_types;
import java.util.ArrayList;

/**
 *
 * @author Mr-aUgust
 */
public class Btbl_Car_types {
private DALtbl_Car_types _objDALtbl_Car_types=null;
    public Btbl_Car_types() {
        _objDALtbl_Car_types=new DALtbl_Car_types();
    }
    public boolean addtbl_Car_types(Etbl_Car_types objEtbl_Car_types){
        return _objDALtbl_Car_types.addtbl_Car_types(objEtbl_Car_types);
    }
    public boolean edittbl_Car_types(Etbl_Car_types objEtbl_Car_types){
        return _objDALtbl_Car_types.edittbl_Car_types(objEtbl_Car_types);
    }
    public boolean deletetbl_Car_types(int cartype_Id){
        if(cartype_Id > 0) // dieu kien >0 vi trong db cartype_Id tu dong tang va bat dau tu 1
            return _objDALtbl_Car_types.deletetbl_Car_types(cartype_Id);
        else
            return false;
    }
    public Etbl_Car_types getOne_CarType(int cartype_Id){
        if(cartype_Id>0){
            return _objDALtbl_Car_types.getOne_CarType(cartype_Id);
        }
        else{
            return null;
        }
    }
    public ArrayList<Etbl_Car_types> getList_CarType(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDALtbl_Car_types.getList_CarType(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
}
